package com.realbrand.net.realbrandpay.ui.activity.gradevin;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;
import android.widget.ExpandableListView;
import android.widget.TextView;

import com.realbrand.net.realbrandpay.R;
import com.realbrand.net.realbrandpay.adapter.GradevinAdapter;
import com.realbrand.net.realbrandpay.base.BaseActivity;
import com.realbrand.net.realbrandpay.bean.GradevinBean;
import com.realbrand.net.realbrandpay.ui.activity.ADSActivity;
import com.realbrand.net.realbrandpay.ui.activity.mall.MallActivity;
import com.realbrand.net.realbrandpay.ui.activity.mall.MallCarActivity;
import com.realbrand.net.realbrandpay.ui.activity.shopcar.ShopCarActivity;
import com.realbrand.net.realbrandpay.ui.activity.wallet.WalletActivity;
import com.realbrand.net.realbrandpay.untils.Static;
import com.realbrand.net.realbrandpay.zxing.app.CaptureActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2018/7/3.
 */

public class GradevinActivity extends BaseActivity implements IViewGradevin{

    @BindView(R.id.gradevin_toolbar)
    Toolbar gradevinToolBar;
    @BindView(R.id.gradevin_tv_shopCar)
    TextView gradevinTvShopCar;
    @BindView(R.id.gradevin_tv_mallCar)
    TextView gradevinTvMallCar;
    @BindView(R.id.gradevin_listView)
    ExpandableListView gradevinListView;
    @BindView(R.id.gradevin_tv_sumMoney)
    TextView gradevinTvSumMoney;
    @BindView(R.id.gradevin_bt_checked)
    Button gradevinBtChecked;
    @BindView(R.id.shopcar_tv_scan)
    TextView shopcarTvScan;
    @BindView(R.id.shopcar_tv_mall)
    TextView shopcarTvMall;
    @BindView(R.id.shopcar_tv_my)
    TextView shopcarTvMy;
    GradevinAdapter gradevinAdapter;
    List<GradevinBean> list;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        ButterKnife.bind(this);
        gradevinToolBar.setTitle("");
        setSupportActionBar(gradevinToolBar);
        setOnClick();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.gradevin_layout;
    }

    @Override
    protected void setOnClick() {
        shopcarTvMy.setOnClickListener(this);
        shopcarTvMall.setOnClickListener(this);
        shopcarTvScan.setOnClickListener(this);
        gradevinTvMallCar.setOnClickListener(this);
        gradevinTvShopCar.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            //钱包
            case R.id.shopcar_tv_my:
                startActivity(new Intent(this, WalletActivity.class));
                finish();
                break;
            //商城
            case R.id.shopcar_tv_mall:
                startActivity(new Intent(this, MallActivity.class));
                finish();
                break;
            //扫码
            case R.id.shopcar_tv_scan:
                Intent intent = new Intent(this, CaptureActivity.class);
                Bundle bundle_scan = new Bundle();
                bundle_scan.putString(Static.BundleKey, ADSActivity.VALUE_ADS);
                intent.putExtras(bundle_scan);
                startActivity(intent);
                break;
            //正品汇商城购物车
            case R.id.gradevin_tv_mallCar:
                startActivity(new Intent(this, MallCarActivity.class));
                finish();
                break;
            //线下购物车
            case R.id.gradevin_tv_shopCar:
                startActivity(new Intent(this, ShopCarActivity.class));
                finish();
                break;
        }
    }

    @Override
    public String getParamsGradevin() {
        return null;
    }

    @Override
    public void showGradevinResult(List<GradevinBean> list) {

    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showFailMsg(String msg) {

    }

    @Override
    public void showError() {

    }

    @Override
    public Context getContext() {
        return null;
    }
}
